<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        
        //函数在使用的时候后面不能跟括号，括号表示是立即执行
        let time=setInterval(con,1000)
        function con(){
            console.log("定时器中使用")
        }
        clearInterval(time)
    </script>
</body>
</html>